{% load static %}
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>用户管理</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="{% static 'users/bower_components/bootstrap/dist/css/bootstrap.min.css' %}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{% static 'users/bower_components/font-awesome/css/font-awesome.min.css' %}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{% static 'users/bower_components/Ionicons/css/ionicons.min.css' %}">
    <!-- DataTables -->
    <link rel="stylesheet"
          href="{% static 'users/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css' %}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{% static 'users/dist/css/AdminLTE.min.css' %}">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="{% static 'users/dist/css/skins/_all-skins.min.css' %}">
    <link rel="stylesheet" href="{% static 'users/dist/css/bootstrap-table.min.css' %}">
    <link rel="stylesheet" href="{% static 'users/dist/member.css' %}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>

<body class="hold-transition sidebar-mini">


<!-- Content Wrapper. Contains page content -->
<div class="wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            用户管理
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
            <li class="active">用户管理</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <!-- <div class="box-header">
                      <h3 class="box-title">Data Table With Full Features</h3>
                    </div> -->
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="memberTable" class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>账号</th>
                                <th>归属人</th>
                                <th>添加日期</th>
                                <th>状态</th>
                                <th>权限</th>
                                <th>最后登录ip</th>
                                <th>最后登录时间</th>
                                <td><label>
                                    <input type="checkbox" id="select_all">
                                </label></td>
                            </tr>
                            </thead>
                            <tbody>
                            {% for i in users %}
                                <tr>
                                    <td>{{ forloop.counter }}</td>
                                    <td>{{ i.account }}</td>
                                    <td>{{ i.belongs }}</td>
                                    <td>{{ i.add_date }}</td>
                                    <td>{% if  i.status == 0 %}使用中{% else %}失效{% endif %}</td>
                                    <td>{% if  i.auth == 0 %}用户{% else %}管理员{% endif %}</td>
                                    <td>{{ i.last_ip }}</td>
                                    <td>{{ i.last_time }}</td>
                                    <td><label>
                                        <input id="cb{{ i.id }}" type="checkbox" class="cb">
                                    </label></td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->

    <div class="modal fade" id="modal-default">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 id="dialog_title" class="modal-title">注册新员工</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div id="div_add_user" class="col-md-8 col-md-offset-2">
                            <div class="form-group">
                                <label for="account">账号</label><label class="error_hint"></label>
                                <input id="account" type="text" class="form-control" placeholder="">
                            </div>
                            <div class="form-group">
                                <label for="belongs">归属人</label><label class="error_hint"></label>
                                <input id="belongs" type="text" class="form-control" placeholder="">
                            </div>
                            <div class="form-group">
                                <label for="password">密码</label><label class="error_hint"></label>
                                <input id="password" type="password" class="form-control" placeholder="">
                            </div>
                            <div class="form-group" id="div_confirm">
                                <label for="confirm">确认密码</label><label class="error_hint"></label>
                                <input id="confirm" type="password" class="form-control" placeholder="">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <div class="row">
                        <div class="col-md-2 col-md-offset-5">
                            <button id="save" type="button" class="btn btn-block btn-primary btn-sm" to="add">保存
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
</div>
<div id="alertDiv"></div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="{% static 'users/bower_components/jquery/dist/jquery.min.js' %}"></script>
<!-- Bootstrap 3.3.7 -->
<script src="{% static 'users/bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>
<!-- DataTables -->
<script src="{% static 'users/bower_components/datatables.net/js/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'users/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js' %}"></script>
<script src="{% static 'users/dist/js/bootstrap-table.min.js' %}"></script>
<!-- page script -->
<script src="{% static 'business/tools.js' %}"></script>
<script src="{% static 'users/dist/member.js' %}"></script>
</body>
</html>